/*
 * @Author: qiuz
 * @Date: 2018-03-27 09:20:56
 * */

function addOnceEventListener(element, event, listener) {

	const onceListener = e => {
		listener(e);
		element.removeEventListener(event, onceListener);
	};

	element.addEventListener(event, onceListener);

	return onceListener;
}

export {
	addOnceEventListener
};

